unit CoreCollider;

interface

uses
	CoreTypes, CoreMath;

type
	TCollider = class
		function PointRect(p: TVec2; r: TRect): Boolean;

		//function BoxBox(min, max, min2, max2: TVec3): Boolean;
		//function SphereSphere(pos: TVec3; radius: Single; pos2: TVec3; radius2: Single): Boolean;
	end;

var
	col: TCollider;

implementation

function TCollider.PointRect(p: TVec2; r: TRect): Boolean;
begin
	Result := (p.x >= r.x) and (p.x <= r.x + r.w) and (p.y >= r.y) and (p.y <= r.y + r.h);
end;

end.
